class Solution {
private:
    vector<string> turn={"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
public:
    vector<string> res;
    string tmp;
    void dfs(string& digits,int cur){
        if(cur==digits.length()){
            res.emplace_back(tmp);
            return;
        }
        int pos=digits[cur]-'0';
        for(int i=0;i<turn[pos].size();i++){
            tmp.push_back(turn[pos][i]);
            dfs(digits,cur+1);
            tmp.pop_back();
        }
    }
    vector<string> letterCombinations(string digits) {
        if(digits=="")
            return {};
        dfs(digits,0);
        return res;
    }
};
